namespace CSharpPro._1021;

public class Student
{
    //字段
    private int id;
    private String name;
    private String userEmail;
    
    //属性
    public int Id
    {
        get => id;
        set => id = value;
    }

    public string Name
    {
        get => name;
        set => name = value ?? throw new ArgumentNullException(nameof(value));
    }

    public string UserEmail
    {
        get => userEmail;
        set => userEmail = value ?? throw new ArgumentNullException(nameof(value));
    }

    public Student()
    {
    }

    public Student(int id, string name)
    {
        this.id = id;
        this.name = name;
    }

    public Student(int id)
    {
        this.id = id;
    }

    public Student(string name)
    {
        this.name = name;
    }


    public int Compare(int a, int b, int c)
    {
        if (a>b&&a>c)
        {
            return a;
        }else if (b > c && b > a)
        {
            return b;
        }else if (c > a && c > b)
        {
            return c;
        }
        else
        {
            return 0;
        }
    }
}